using Microsoft.VisualBasic;
using Microsoft.VisualBasic.ApplicationServices;
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace yWriter6.My
{
	[StandardModule]
	[HideModuleName]
	[GeneratedCode("MyTemplate", "11.0.0.0")]
	internal sealed class MyProject
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		[MyGroupCollection("System.Windows.Forms.Form", "Create__Instance__", "Dispose__Instance__", "My.MyProject.Forms")]
		internal sealed class MyForms
		{
			[ThreadStatic]
			private static Hashtable m_FormBeingCreated;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmEditCharacter m_frmEditCharacter;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmEditItem m_frmEditItem;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmEditLocation m_frmEditLocation;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmEditorSettings m_frmEditorSettings;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmEditVariables m_frmEditVariables;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmFillList m_frmFillList;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmHighlightColours m_frmHighlightColours;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmImportOutline m_frmImportOutline;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmImportWIP m_frmImportWIP;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmIndexCards m_frmIndexCards;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmMain m_frmMain;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmProblemWord m_frmProblemWord;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmProblemWords m_frmProblemWords;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmProjectWizard m_frmProjectWizard;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmRestoreAutobackup m_frmRestoreAutobackup;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmWordCount m_frmWordCount;

			[EditorBrowsable(EditorBrowsableState.Never)]
			public frmWordLog m_frmWordLog;

			public frmEditCharacter frmEditCharacter
			{
				get
				{
					m_frmEditCharacter = Create__Instance__(m_frmEditCharacter);
					return m_frmEditCharacter;
				}
				set
				{
					if (value != m_frmEditCharacter)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmEditCharacter);
					}
				}
			}

			public frmEditItem frmEditItem
			{
				get
				{
					m_frmEditItem = Create__Instance__(m_frmEditItem);
					return m_frmEditItem;
				}
				set
				{
					if (value != m_frmEditItem)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmEditItem);
					}
				}
			}

			public frmEditLocation frmEditLocation
			{
				get
				{
					m_frmEditLocation = Create__Instance__(m_frmEditLocation);
					return m_frmEditLocation;
				}
				set
				{
					if (value != m_frmEditLocation)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmEditLocation);
					}
				}
			}

			public frmEditorSettings frmEditorSettings
			{
				get
				{
					m_frmEditorSettings = Create__Instance__(m_frmEditorSettings);
					return m_frmEditorSettings;
				}
				set
				{
					if (value != m_frmEditorSettings)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmEditorSettings);
					}
				}
			}

			public frmEditVariables frmEditVariables
			{
				get
				{
					m_frmEditVariables = Create__Instance__(m_frmEditVariables);
					return m_frmEditVariables;
				}
				set
				{
					if (value != m_frmEditVariables)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmEditVariables);
					}
				}
			}

			public frmFillList frmFillList
			{
				get
				{
					m_frmFillList = Create__Instance__(m_frmFillList);
					return m_frmFillList;
				}
				set
				{
					if (value != m_frmFillList)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmFillList);
					}
				}
			}

			public frmHighlightColours frmHighlightColours
			{
				get
				{
					m_frmHighlightColours = Create__Instance__(m_frmHighlightColours);
					return m_frmHighlightColours;
				}
				set
				{
					if (value != m_frmHighlightColours)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmHighlightColours);
					}
				}
			}

			public frmImportOutline frmImportOutline
			{
				get
				{
					m_frmImportOutline = Create__Instance__(m_frmImportOutline);
					return m_frmImportOutline;
				}
				set
				{
					if (value != m_frmImportOutline)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmImportOutline);
					}
				}
			}

			public frmImportWIP frmImportWIP
			{
				get
				{
					m_frmImportWIP = Create__Instance__(m_frmImportWIP);
					return m_frmImportWIP;
				}
				set
				{
					if (value != m_frmImportWIP)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmImportWIP);
					}
				}
			}

			public frmIndexCards frmIndexCards
			{
				get
				{
					m_frmIndexCards = Create__Instance__(m_frmIndexCards);
					return m_frmIndexCards;
				}
				set
				{
					if (value != m_frmIndexCards)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmIndexCards);
					}
				}
			}

			public frmMain frmMain
			{
				get
				{
					m_frmMain = Create__Instance__(m_frmMain);
					return m_frmMain;
				}
				set
				{
					if (value != m_frmMain)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmMain);
					}
				}
			}

			public frmProblemWord frmProblemWord
			{
				get
				{
					m_frmProblemWord = Create__Instance__(m_frmProblemWord);
					return m_frmProblemWord;
				}
				set
				{
					if (value != m_frmProblemWord)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmProblemWord);
					}
				}
			}

			public frmProblemWords frmProblemWords
			{
				get
				{
					m_frmProblemWords = Create__Instance__(m_frmProblemWords);
					return m_frmProblemWords;
				}
				set
				{
					if (value != m_frmProblemWords)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmProblemWords);
					}
				}
			}

			public frmProjectWizard frmProjectWizard
			{
				get
				{
					m_frmProjectWizard = Create__Instance__(m_frmProjectWizard);
					return m_frmProjectWizard;
				}
				set
				{
					if (value != m_frmProjectWizard)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmProjectWizard);
					}
				}
			}

			public frmRestoreAutobackup frmRestoreAutobackup
			{
				get
				{
					m_frmRestoreAutobackup = Create__Instance__(m_frmRestoreAutobackup);
					return m_frmRestoreAutobackup;
				}
				set
				{
					if (value != m_frmRestoreAutobackup)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmRestoreAutobackup);
					}
				}
			}

			public frmWordCount frmWordCount
			{
				get
				{
					m_frmWordCount = Create__Instance__(m_frmWordCount);
					return m_frmWordCount;
				}
				set
				{
					if (value != m_frmWordCount)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmWordCount);
					}
				}
			}

			public frmWordLog frmWordLog
			{
				get
				{
					m_frmWordLog = Create__Instance__(m_frmWordLog);
					return m_frmWordLog;
				}
				set
				{
					if (value != m_frmWordLog)
					{
						if (value != null)
						{
							throw new ArgumentException("Property can only be set to Nothing");
						}
						Dispose__Instance__(ref m_frmWordLog);
					}
				}
			}

			[DebuggerHidden]
			private static T Create__Instance__<T>(T Instance) where T : Form, new()
			{
				if (Instance == null || Instance.IsDisposed)
				{
					if (m_FormBeingCreated != null)
					{
						if (m_FormBeingCreated.ContainsKey(typeof(T)))
						{
							throw new InvalidOperationException(Utils.GetResourceString("WinForms_RecursiveFormCreate"));
						}
					}
					else
					{
						m_FormBeingCreated = new Hashtable();
					}
					m_FormBeingCreated.Add(typeof(T), null);
					try
					{
						return new T();
					}
					catch (TargetInvocationException ex)/* when/* (OpCode not supported: BlockContainer)#1#*/
					{
						TargetInvocationException ex2;
						//throw new InvalidOperationException(Utils.GetResourceString("WinForms_SeeInnerException", ex2.InnerException.Message), ex2.InnerException);
					}
					finally
					{
						m_FormBeingCreated.Remove(typeof(T));
					}
				}
				return Instance;
			}

			[DebuggerHidden]
			private void Dispose__Instance__<T>(ref T instance) where T : Form
			{
				instance.Dispose();
				instance = null;
			}

			[DebuggerHidden]
			[EditorBrowsable(EditorBrowsableState.Never)]
			public MyForms()
			{
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			public override bool Equals(object o)
			{
				return base.Equals(RuntimeHelpers.GetObjectValue(o));
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			public override int GetHashCode()
			{
				return base.GetHashCode();
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			internal new Type GetType()
			{
				return typeof(MyForms);
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			public override string ToString()
			{
				return base.ToString();
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", "")]
		internal sealed class MyWebServices
		{
			[EditorBrowsable(EditorBrowsableState.Never)]
			[DebuggerHidden]
			public override bool Equals(object o)
			{
				return base.Equals(RuntimeHelpers.GetObjectValue(o));
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			[DebuggerHidden]
			public override int GetHashCode()
			{
				return base.GetHashCode();
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			[DebuggerHidden]
			internal new Type GetType()
			{
				return typeof(MyWebServices);
			}

			[EditorBrowsable(EditorBrowsableState.Never)]
			[DebuggerHidden]
			public override string ToString()
			{
				return base.ToString();
			}

			[DebuggerHidden]
			private static T Create__Instance__<T>(T instance) where T : new()
			{
				if (instance == null)
				{
					return new T();
				}
				return instance;
			}

			[DebuggerHidden]
			private void Dispose__Instance__<T>(ref T instance)
			{
				instance = default(T);
			}

			[DebuggerHidden]
			[EditorBrowsable(EditorBrowsableState.Never)]
			public MyWebServices()
			{
			}
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[ComVisible(false)]
		internal sealed class ThreadSafeObjectProvider<T> where T : new()
		{
			[CompilerGenerated]
			[ThreadStatic]
			private static T m_ThreadStaticValue;

			internal T GetInstance
			{
				[DebuggerHidden]
				get
				{
					if (m_ThreadStaticValue == null)
					{
						m_ThreadStaticValue = new T();
					}
					return m_ThreadStaticValue;
				}
			}

			[DebuggerHidden]
			[EditorBrowsable(EditorBrowsableState.Never)]
			public ThreadSafeObjectProvider()
			{
			}
		}

		private static readonly ThreadSafeObjectProvider<MyComputer> m_ComputerObjectProvider = new ThreadSafeObjectProvider<MyComputer>();

		private static readonly ThreadSafeObjectProvider<MyApplication> m_AppObjectProvider = new ThreadSafeObjectProvider<MyApplication>();

		private static readonly ThreadSafeObjectProvider<User> m_UserObjectProvider = new ThreadSafeObjectProvider<User>();

		private static ThreadSafeObjectProvider<MyForms> m_MyFormsObjectProvider = new ThreadSafeObjectProvider<MyForms>();

		private static readonly ThreadSafeObjectProvider<MyWebServices> m_MyWebServicesObjectProvider = new ThreadSafeObjectProvider<MyWebServices>();

		[HelpKeyword("My.Computer")]
		internal static MyComputer Computer
		{
			[DebuggerHidden]
			get
			{
				return m_ComputerObjectProvider.GetInstance;
			}
		}

		[HelpKeyword("My.Application")]
		internal static MyApplication Application
		{
			[DebuggerHidden]
			get
			{
				return m_AppObjectProvider.GetInstance;
			}
		}

		[HelpKeyword("My.User")]
		internal static User User
		{
			[DebuggerHidden]
			get
			{
				return m_UserObjectProvider.GetInstance;
			}
		}

		[HelpKeyword("My.Forms")]
		internal static MyForms Forms
		{
			[DebuggerHidden]
			get
			{
				return m_MyFormsObjectProvider.GetInstance;
			}
		}

		[HelpKeyword("My.WebServices")]
		internal static MyWebServices WebServices
		{
			[DebuggerHidden]
			get
			{
				return m_MyWebServicesObjectProvider.GetInstance;
			}
		}
	}
}
